package com.hyt.it.ogt.kq.common.gov.enums.admission.variable;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

import com.hyt.it.ogt.kq.common.gov.constant.admission.AdmissionTicketTemplateCode;

/**
 * 自定义模板配置 只包含公有的
 *
 * @author zhoumiao
 * @since 2023/2/15 11:38
 **/
public interface CustomTemplateConfigCode {
    String getCode();

    String getText();


    static List<CustomTemplateConfigCode> publicConfigs() {
        return Arrays.stream(CustomTemplateConfigCode.PublicConfigCode.values()).collect(Collectors.toList());
    }


    // 公共的 添加后需要在初始化时进行填充默认值 涉及方法 AdmissionTicketTemplateVariableServiceImpl.initStandardTemplateVariable
    enum PublicConfigCode implements CustomTemplateConfigCode {
        // 公共信息
        EXAM_AGREEMENT(AdmissionTicketTemplateCode.EXAM_AGREEMENT, "考生须知"),
        EXAM_NAME(AdmissionTicketTemplateCode.EXAM_NAME, "考试名称"),
        ;

        String code;
        String text;

        PublicConfigCode(String code, String text) {
            this.code = code;
            this.text = text;
        }

        public String getCode() {
            return code;
        }

        public String getText() {
            return text;
        }
    }
}
